package com.yaoxuguang.concurrence.wait_notify.thread_commumication_pipeline;

import java.io.PipedWriter;

/**
 * @author yaoxuguang
 * @Title: yao-interview
 * @Package com.yaoxuguang.concurrence.wait_notify.thread_commumication_pipeline
 * @Description: 写数据线程
 * @date 2018年12月24日11:06
 */
public class ThreadWrite extends Thread {
    private WriteData writeData;
    private PipedWriter pipedWriter;

    public ThreadWrite(WriteData writeData, PipedWriter pipedWriter) {
        this.writeData = writeData;
        this.pipedWriter = pipedWriter;
    }

    @Override
    public void run() {
        writeData.writeMethod(pipedWriter);
    }
}
